<?php
if (function_exists('register_sidebar')) 
{
	register_sidebars(2, array(
	'name'			=> 'Sidebar %d',
	'before_widget'	=> '<li id="%1$s" class="widget %2$s">',
	'after_widget'	=> '</li>',
	'before_title'	=> '<h2 class="widgettitle">',
	'after_title'	=> '</h2>'
	));
}

function widget_mytheme_search() {
?>
	<li id="search_block">
	<h2>Search</h2>
    <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
		<div>
			<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
			<input type="submit" id="searchsubmit" value="&raquo;" />
		</div>
	</form>
	</li>
<?php
}
if ( function_exists('register_sidebar_widget') )
    register_sidebar_widget(__('Search'), 'widget_mytheme_search');
?>